<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>

<button id="ajaxBtn">点击发送ajax请求</button>
</body>
<script type="text/javascript" src="../js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('#ajaxBtn').click(function () {
            $.ajax({
                url: "./demo02.do",
                data: {name: "张三", age: 18},
                type: "GET",
                success: function (data) {
                    //回调函数
                    console.log(data);
                },
                dataType: "text"
            });
        });
    })
</script>
</html>